<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <?php
    $dbshop_shop_name        = $this->frontwebsite()->websiteInfo('shop_name');
    $dbshop_shop_extend_name = $this->frontwebsite()->websiteInfo('shop_extend_name');
    $dbshop_shop_keywords    = trim($dbshop_shop_name . ',' . $this->frontwebsite()->websiteInfo('shop_keywords'), ',');
    $dbshop_shop_description = trim($dbshop_shop_name . ',' . $this->frontwebsite()->websiteInfo('shop_description'), ',');

    $this->headtitle($this->title_name);
    $this->headtitle($this->extend_title_name);

    if(isset($this->dbTongJiPage) and $this->dbTongJiPage == 'index') {
        $this->headtitle($dbshop_shop_name);
        $this->headtitle($dbshop_shop_extend_name);
    } else {
        $dbshop_shop_keywords    = $dbshop_shop_name;
        $dbshop_shop_description = $dbshop_shop_name;
        $this->headtitle($dbshop_shop_name);
    }

    echo $this->headTitle()->setSeparator(' - ');
    ?>

    <?php
    $title_and_extend_title_name = (!empty($this->title_name) ?  $this->title_name. ',' : '') . (!empty($this->extend_title_name) ?  $this->extend_title_name . ',' : '');

    $this->headMeta()->appendName('keywords',        $title_and_extend_title_name . $this->extend_keywords . $dbshop_shop_keywords);
    $this->headMeta()->appendName('description',     $title_and_extend_title_name . $this->extend_description . $dbshop_shop_description);
    $this->headMeta()->appendName('author',          DBSHOP_FRONT_COPYRIGHT);
    $this->headMeta()->appendName('copyright',       DBSHOP_FRONT_COPYRIGHT . ' Inc. All Rights Reserved');

    $this->headMeta()->setProperty('og:type',        'website');
    $this->headMeta()->setProperty('og:title',       $title_and_extend_title_name . $dbshop_shop_name);
    $this->headMeta()->setProperty('og:description', $title_and_extend_title_name . $this->extend_description . $dbshop_shop_description);
    $this->headMeta()->setProperty('og:site_name',   $dbshop_shop_name);
    $this->headMeta()->setProperty('og:url',         $this->serverUrl(true));

    echo $this->headMeta();
    ?>

    <link href="<?php echo ($this->frontwebsite()->websiteInfo('shop_ico') != '' ? $this->basePath($this->frontwebsite()->websiteInfo('shop_ico')) : ''); ?>" rel="shortcut icon">
    <link href="<?php
    $dbshop_front_template_dir = 'default';
    $dbshop_front_template_css = 'default';
    if((defined('DBSHOP_TEMPLATE') and DBSHOP_TEMPLATE != '' and DBSHOP_TEMPLATE != $dbshop_front_template_dir) or (defined('DBSHOP_TEMPLATE_CSS') and DBSHOP_TEMPLATE_CSS != '' and DBSHOP_TEMPLATE_CSS != $dbshop_front_template_css)) {
        $dbshop_front_template_dir = DBSHOP_TEMPLATE;
        $dbshop_front_template_css = DBSHOP_TEMPLATE_CSS;
    }
    echo $this->basePath('public/css/'.$dbshop_front_template_dir.'/css/'.$dbshop_front_template_css.'.css');
    ?>" rel="stylesheet">

    <script type="text/javascript">
        if (/MSIE 6/.test(navigator.userAgent)) {
            window.location = '<?php echo $this->basePath('public/support-browser.html'); ?>';
        }
    </script>
    <!--[if lte IE 8]>
    <script src="<?php echo $this->basePath('public/js/html5.js'); ?>"></script>
    <![endif]-->
    <script src="<?php echo $this->basePath('public/css/'.$dbshop_front_template_dir.'/js/frontJs.js'); ?>"></script>
</head>

<body id="dbshop-body">
<?php echo $this->partial('site/header'); ?>
<?php echo $this->content; ?>
<?php echo $this->partial('site/footer'); ?>
<!--[if lte IE 8]>
<script>
    $("#dbshop-body").prepend('<p style="color:red;">您的浏览器版本有点低，对站点的某些视觉效果支持不是很好，您可以考虑去 升级浏览器版本 或者安装 <a href="http://rj.baidu.com/soft/detail/14744.html" target="_blank">Chrome</a> 、<a href="http://www.firefox.com.cn/" target="_blank">Firefox</a> 、<a href="http://www.baidu.com/s?wd=IE9" target="_blank">IE9或更高版本</a> 等其他浏览器!</p>');
</script>
<![endif]-->
<script>
    $(".slider").Slider();
</script>
<?php if(isset($this->kefu_html) and $this->kefu_html != '') echo $this->partial('site/kefu', array('kefuHtml'=>$this->kefu_html)); ?>

<script src="<?php echo $this->basePath('public/css/dbblack/js/go-top.js'); ?>"></script>

<?php $imConfig = $this->frontwebsite()->longImConfig(); if(isset($imConfig['longImIDState']) && $imConfig['longImIDState'] == 'true' && !empty($imConfig['longImRange']) && in_array('pc', $imConfig['longImRange'])) { ?>
    <script src="https://www.longkefu.net/longkefu.js?ID=<?php echo $this->escapeHtml($imConfig['longImID']); ?>" type="text/javascript"></script>
<?php } ?>
</body>
</html>
